package model

import ("gorm.io/gorm")

type Post struct {
	gorm.Model
	Title   string `json:"title" gorm:"type:varchar(100);not null"`
	Content string `json:"content" gorm:"type:text;not null"`
	Author  string `json:"author" gorm:"type:varchar(50);not null"`
	Status  string `json:"status" gorm:"type:varchar(20);default:'pending'"`
	Cover   string `json:"cover" gorm:"type:varchar(255);default:''"`
	UserID  uint   `json:"userId"` // 关联用户ID
} 